import "./index.css";
import { Avatar } from "antd";
import touxiang from "@/assets/img/header/头像.jpg";
import { useNavigate } from "react-router-dom";
function Header(params) {
  const navigate = useNavigate();
  function handleLogin() {
    navigate("/login");
  };
  function handleRegister(){
    navigate("/register");
  }
  return (
    <div className="header-container">
      <div className="space-item1"></div>
      <div className="item avator">
        <Avatar src={touxiang}></Avatar>
      </div>
      <div className="space-item2"></div>
      <div className="item login" onClick={handleLogin}>Login</div>
      <div className="space-item3"></div>
      <div className="item register" onClick={handleRegister}>Register</div>
      <div className="space-item4"></div>
    </div>
  );
}

export default Header;
